<template>
	<view class="exam-page">
	<zero-custom-bar :singleIcon="true" title="模拟考试" color="#fff" :singleIconType="'back'">
	</zero-custom-bar>
	<view class="exam-top">
		<text class="title">连续2次模拟考试</text>
		<text class="title2">90分以上再去考试！</text>
	</view>
	
	<!-- 注意事项区域 - 更加醒目 -->
	<view class="notice-section">
		<view class="notice-header">
			<view class="notice-icon">⚠️</view>
			<text class="notice-title">重要提醒</text>
		</view>
		<view class="notice-content">
			<text class="notice-text">正式考试前请仔细核对证件号码、姓名、操作项目是否正确。</text>
		</view>
	</view>
	
	<view class="exam-box">
		<view class="exam-tips">
			<view class="exam-txt">
				<text class="h3">考生姓名：</text>
				<text>{{ userInfo.nickname }}</text>
			</view>
			<view class="exam-txt">
				<text class="h3">证件号码：</text>
				<text>{{ userInfo.identity }}</text>
			</view>
			<view class="exam-txt">
				<text class="h3">操作项目：</text>
				<text>{{ opcname }}</text>
			</view>
			<view class="exam-txt">
				<text class="h3">考试时间：</text>
				<text>120分钟</text>
			</view>
			<view class="exam-txt">
				<text class="h3">合格标准：</text>
				<text>80分及格（满分100分）</text>
			</view>
		</view>
	</view>
	
	<!-- 优化后的按钮区域 -->
	<view class="button-section">
		<view class="button-container">
			<view @click="startExam" class="exam-btn btn-primary">
				<view class="btn-icon-wrapper">
					<view class="btn-icon">📝</view>
				</view>
				<view class="btn-content">
					<text class="btn-title">开始模拟考试</text>
					<text class="btn-subtitle">仿真模拟考试环境</text>
				</view>
				<view class="btn-arrow-wrapper">
					<view class="btn-arrow">→</view>
				</view>
			</view>
		</view>
	</view>
	<!-- <view class="ad-2">
		<image src="../../static/img/banner3.jpg" mode=""></image>
	</view> -->
</view>
	
</template>

<script>
	export default {
		data() {
			return {
				userInfo: {},
				opc: '',
				type: '',
				opcname: ''
			}
		},
		onLoad(options) {
			this.opc = options.opc
			this.type = options.type
			this.opcname = options.opcname
			this.userInfo = uni.getStorageSync('userinfo')
		},
		methods: {
		
			startExam() {
				this.courseId  = uni.getStorageSync('opcData').courseId
				uni.navigateTo({
					url: '/pages/question/questionList?type=2&opcname=' + this.opcname + '&opc=' + this.opc+'&title=理论模拟考试&courseId=' + this.courseId
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.exam-page {
		background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 50%, #ffb3b3 100%);
		min-height: 100vh;
	}

	.exam-top {
		margin-top: 35rpx;
		padding: 0 35rpx;

		.title {
			display: block;
			font-weight: 700;
			font-size: 46rpx;
			color: #FFFFFF;
		}

		.title2 {
			display: block;
			font-weight: 700;
			font-size: 46rpx;
			color: #FFE7C5FF;
			margin-top: 8rpx;
		}

		.tips {
			display: flex;
			justify-content: space-between;
			align-items: center;
			background: #ffffff80;
			border-radius: 40rpx;
			padding: 15rpx 15rpx;
			margin-top: 30rpx;

			.iconfont {
				font-size: 38rpx;
			}

			.icon-yangshengqi {
				color: #e5564bFF;
			}

			.icon-erjiyemianjiantou01 {
				font-size: 26rpx;
			}

			text {
				font-size: 24rpx;
				color: #0E0E10;
			}
		}
	}

	/* 注意事项区域样式 */
	.notice-section {
		background: rgba(255, 255, 255, 0.15);
		backdrop-filter: blur(10rpx);
		border: 1rpx solid rgba(255, 255, 255, 0.2);
		margin: 30rpx;
		border-radius: 20rpx;
		padding: 30rpx;
		box-shadow: 0 8rpx 25rpx rgba(0, 0, 0, 0.1);
		
		.notice-header {
			display: flex;
			align-items: center;
			margin-bottom: 20rpx;
			
			.notice-icon {
				font-size: 40rpx;
				margin-right: 15rpx;
			}
			
			.notice-title {
				font-size: 32rpx;
				font-weight: 700;
				color: #FFFFFF;
			}
		}
		
		.notice-content {
			.notice-text {
				font-size: 28rpx;
				color: #FFFFFF;
				line-height: 40rpx;
				font-weight: 500;
			}
		}
	}

	.exam-box {
		background: rgba(255, 255, 255, 0.95);
		backdrop-filter: blur(10rpx);
		border: 1rpx solid rgba(255, 255, 255, 0.3);
		box-shadow: 0 8rpx 25rpx rgba(0, 0, 0, 0.1);
		border-radius: 20rpx;
		margin: 30rpx;
		padding: 28rpx;

		.exam-tips {
			margin: 0 20rpx;

			.exam-txt {
				font-weight: 400;
				font-size: 28rpx;
				color: #4B4B4D;
				display: flex;
				align-items: center;
				margin-bottom: 15rpx;

				.h3 {
					font-weight: 700;
					font-size: 30rpx;
					color: #0E0E10;
				}

				text {}
			}
		}
	}

	/* 优化后的按钮区域样式 */
	.button-section {
		margin: 30rpx;
		padding-bottom: 50rpx;
		
		.button-container {
			background: rgba(255, 255, 255, 0.1);
			border-radius: 25rpx;
			padding: 20rpx;
			backdrop-filter: blur(10rpx);
			border: 1rpx solid rgba(255, 255, 255, 0.2);
		}
		
		.exam-btn {
			background: linear-gradient(135deg, #FF4757, #FF3742);
			border-radius: 20rpx;
			padding: 0;
			box-shadow: 0 15rpx 35rpx rgba(255, 71, 87, 0.4);
			transition: all 0.3s ease;
			position: relative;
			overflow: hidden;
			display: flex;
			align-items: center;
			
			&:active {
				transform: translateY(3rpx) scale(0.98);
				box-shadow: 0 8rpx 20rpx rgba(255, 71, 87, 0.3);
			}
			
			&::before {
				content: '';
				position: absolute;
				top: 0;
				left: -100%;
				width: 100%;
				height: 100%;
				background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
				transition: left 0.5s;
			}
			
			&:active::before {
				left: 100%;
			}
			
			.btn-icon-wrapper {
				padding: 30rpx 25rpx;
				background: rgba(255, 255, 255, 0.15);
				border-radius: 20rpx 0 0 20rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				
				.btn-icon {
					font-size: 45rpx;
				}
			}
			
			.btn-content {
				flex: 1;
				padding: 30rpx 25rpx;
				
				.btn-title {
					display: block;
					font-size: 34rpx;
					font-weight: 700;
					color: #FFFFFF;
					margin-bottom: 6rpx;
				}
				
				.btn-subtitle {
					display: block;
					font-size: 22rpx;
					color: rgba(255, 255, 255, 0.8);
				}
			}
			
			.btn-arrow-wrapper {
				padding: 30rpx 25rpx;
				background: rgba(255, 255, 255, 0.1);
				border-radius: 0 20rpx 20rpx 0;
				display: flex;
				align-items: center;
				justify-content: center;
				
				.btn-arrow {
					font-size: 35rpx;
					color: #FFFFFF;
					font-weight: 700;
					transition: transform 0.3s ease;
				}
			}
			
			&:active .btn-arrow {
				transform: translateX(5rpx);
			}
		}
	}




</style>